project (INCUB)

cmake_minimum_required(VERSION 2.6)

include(FindPkgConfig)

set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_modules/)

pkg_check_modules(OMNIORB4 REQUIRED omniORB4)
pkg_check_modules(OMNIDYNAMIC4 REQUIRED omniDynamic4)
pkg_check_modules(GL REQUIRED gl)
FIND_PACKAGE(GLUT REQUIRED)
pkg_check_modules(ODE REQUIRED ode)
FIND_PACKAGE(Boost REQUIRED)

add_definitions(
	${OMNIORB4_CFLAGS}
	${OMNIDYNAMIC4_CFLAGS}
	${ODE_CFLAGS}
	${GL_CFLAGS}
)

include_directories (
	${OMNIORB4_INCLUDE_DIRS}
	${OMNIDYNAMIC4_INCLUDE_DIRS}
	${GLUT_INCLUDE_DIR}
	${GL_INCLUDE_DIRS}
	${ODE_INCLUDE_DIRS}
	${BOOST_INCLUDE_DIRS}
)

link_directories (${Boost_LIBRARY_DIRS})

add_subdirectory(src)

INSTALL(DIRECTORY examples/ DESTINATION share/incub/examples PATTERN "examples/*.xml" PATTERN .svn EXCLUDE)
INSTALL(FILES COPYING README ChangeLog DESTINATION share/doc/incub)

